package com.atguigu.springcloud.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping(value = "/consumer")
public class OrderZkController {

    //此处为支付模块的路径
    private  static  final  String ZK_URL="http://cloud-provider-payment";

    @Autowired
    private RestTemplate restTemplate;


    @GetMapping("/payment/zk")
    public String getZK(){
        String result=  restTemplate.getForObject(ZK_URL+"/payment/zk",String.class);
        return result;
    }
}
